﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Xml;
using System.Web;

namespace AMG.Config
{
    public class DBConfig
    {
        static private string _connStr = string.Empty;
        static DBConfig()
        {
            try
            {
                _connStr = ConfigurationManager.ConnectionStrings["amgconstr"].ConnectionString;
            }
            catch { }
        }
        /// <summary>
        /// 数据库连接
        /// </summary>
        static public string CnString
        {
            get
            {
                return _connStr;
            }
        }
        /// <summary>
        /// 重设数据库连接
        /// </summary>
        /// <param name="connstr"></param>
        static public void ResetConn(string connstr)
        {
            _connStr = connstr;
        }
    }
}
